

package com.hazelcast.query.impl.predicates;

import com.hazelcast.query.Predicate;
import com.hazelcast.query.impl.IndexRegistry;

/**
 * Base class for all visitors. It returns the original predicate without touching.
 * Concrete Visitor can just override the method for predicate the visitor is interested in.
 */
public abstract class AbstractVisitor implements Visitor {

    @Override
    public Predicate visit(EqualPredicate predicate, IndexRegistry indexes) {
        return predicate;
    }

    @Override
    public Predicate visit(NotEqualPredicate predicate, IndexRegistry indexes) {
        return predicate;
    }

    @Override
    public Predicate visit(AndPredicate predicate, IndexRegistry indexes) {
        return predicate;
    }

    @Override
    public Predicate visit(OrPredicate predicate, IndexRegistry indexes) {
        return predicate;
    }

    @Override
    public Predicate visit(NotPredicate predicate, IndexRegistry indexes) {
        return predicate;
    }

    @Override
    public Predicate visit(InPredicate predicate, IndexRegistry indexes) {
        return predicate;
    }

    @Override
    public Predicate visit(BetweenPredicate predicate, IndexRegistry indexes) {
        return predicate;
    }

}
